/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Map;

import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

/**
 *
 * @author Eric-Standard
 */
public class StaticTile extends Tile {

    public Image tileImage;
    public static final Dimension size = new Dimension(Map.TILE_WIDTH, Map.TILE_HEIGHT);

    public StaticTile(Image image) {
        tileImage = image;
    }

    public StaticTile(File file) throws IOException {
        tileImage = ImageIO.read(file);
    }

    public StaticTile(String fileName) throws IOException {
        tileImage = ImageIO.read(new File(fileName));
    }

    @Override
    public void draw(Graphics g, int x, int y) {
        g.drawImage(tileImage, x, y, null);
    }

    @Override
    public Dimension getSize() {
        return size;
    }
}
